<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>更新节点</title>
</head>
<body>

<div id="app">

</div>

</body>
<script>
    let app = document.getElementById("app");
    // 操作html
    app.innerText = "123";  //修改文本的值
    app.innerHTML = "<strong>456</strong>"; //可以解析html标签

    // 操作css
    app.style.color = "red";
    app.style.fontSize = "24px";

</script>
</html>